<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDiscountXMedicineTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('discount_x_medicine', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('merchant_medicine_id')  ->default(0)->comment('商品id');
            $table->bigInteger('merchant_id')           ->default(0)->comment('店铺id');
            $table->bigInteger('discount_sales_rule_id')->default(0) ->comment('折扣id');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('discount_x_medicine');
    }
}
